home *** CD-ROM | disk | FTP | other *** search
/ ClickArt Fonts / ClickArt Fonts.iso / cpic / scripts / defscr next >
Text File  |  1997-04-16  |  4KB  |  177 lines

  1. /*
  2.  
  3. default pickle module 
  4. (Photodex Internal 'C' Kernel Language Environment)
  5.  
  6. Copyright (c)1995 Photodex Corporation.  All rights reserved.
  7. Photodex is a trademark of Photodex Corporation.
  8.  
  9. THIS INFORMATION IS PROPRIETARY AND CONFIDENTIAL.  USE OF THIS INFORMATION
  10. IS STRICTLY PROHIBITED WITHOUT WRITTEN PERMISSION FROM AN EXECUTIVE OFFICER
  11. OF PHOTODEX CORPORATION.
  12.  
  13. */
  14.  
  15. "Copyright (c)1995 Photodex Corporation.  All rights reserved."        // legal copyright notice (emitted in data segment)
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. export "V()" PickleStartup()        /* startup routine */
  23. {
  24.     Deb("PICKLE STARTUP - STARTING");
  25.  
  26.     VarSetGlobal("kbFileDouble","(script code for double click)");        /* set global variable for double click event */
  27.     VarSetGlobal("h","[cpicPath]help/");        /* set global variable for help directory */
  28.  
  29.     // do housekeeping of anything that can change with preferences
  30.     StatDockCheck(ifs);        /* check docking of process status panel */
  31.     RecStatDockCheck(ifs);    /* check docking of file list status panel */
  32.  
  33.     Deb("PICKLE STARTUP - COMPLETE");
  34. }
  35.  
  36.  
  37.  
  38.  
  39. export "V()" mHelpOver()        /* help overview */
  40. {
  41.     Help("[h]help");        /* main help */
  42. }
  43.  
  44.  
  45. export "V()" mHelpAbout()        /* help about */
  46. {
  47.     Deb("CPIC version %s",cpicVer);
  48.     Deb("Pickle version %s",pickleVer);
  49. }
  50.  
  51.  
  52. export "V()" ExitScript()        /* exit script */
  53. {
  54.     Deb("ExitScript calling Exit...");        /* tell user */
  55.     Exit(ifs);        /* exit application */
  56. }
  57.  
  58.  
  59.  
  60. export "V()" tViewScript()        /* view script */
  61. {
  62.     RecPresent(ifs,RecGetCaret(ifs));        /* present record */
  63. }
  64.  
  65.  
  66.  
  67. export "V()" tEditScript()        /* edit script */
  68. {
  69.     RecEdit(ifs,RecGetCaret(ifs));        /* edit record */
  70. }
  71.  
  72.  
  73.  
  74. export "V()" tCreateScript()        /* create script */
  75. {
  76.     Deb("toolbar create new");
  77. }
  78.  
  79.  
  80.  
  81. export "V()" tBogusScript()        /* bogus script */
  82. {
  83.     Deb("toolbar bogus");
  84. }
  85.  
  86.  
  87.  
  88. export "V()" tPathExpAll()        /* expand all paths */
  89. {
  90.     val=0;        // preload temporary variable
  91.  
  92.     pos=0;        /* start at first entry */
  93.     while(1) {
  94.         val=PathGetListCount(ifs);
  95.         if(pos < val) {        /* until done */
  96.             PathExpandListEntry(ifs,pos);        /* expand entry */
  97.         } else {
  98.             break;
  99.         }
  100.         pos++;
  101.     }
  102.     Deb("Done expanding");
  103. }
  104.  
  105.  
  106.  
  107. export "V()" tPathColAll()        /* collapse all paths */
  108. {
  109.     val=0;        // preload temporary variable
  110.  
  111.     pos=PathGetListCount(ifs);        /* start at last entry */
  112.     while(--pos >= 0) {
  113.         PathCollapseListEntry(ifs,pos);        /* collapse entry */
  114.     }
  115. }
  116.  
  117.  
  118.  
  119. export "V()" tPathExpAllSel()        /* expand selected paths recursively */
  120. {
  121.     val=0;        // preload temporary variable
  122.  
  123.     pos=0;        /* start at first entry */
  124.     while(1) {
  125.         pos=PathNextSelItem(ifs,pos);        /* find next selected item */
  126.         if(pos < 0) {
  127.             break;
  128.         }
  129.         val=PathGetListCount(ifs);
  130.         if(pos < val) {        /* until done */
  131.             indent=PathGetListIndent(ifs,pos);        /* get indentation level */
  132.             PathExpandListEntry(ifs,pos);        /* expand entry */
  133.             pos++;
  134.             while(val > indent) {        /* until end of parent's children */
  135.                 PathExpandListEntry(ifs,pos);        /* expand entry */
  136.                 pos++;
  137.                 val=PathGetListIndent(ifs,pos);
  138.             }
  139.         } else {
  140.             break;
  141.         }
  142.     }
  143. }
  144.  
  145.  
  146.  
  147.  
  148. export "V()" tPathExpSel()        /* expand selected paths once */
  149. {
  150.     val=0;        // preload temporary variable
  151.  
  152.     pos=0;        /* start at first entry */
  153.     while(1) {
  154.         pos=PathNextSelItem(ifs,pos);        /* find next selected item */
  155.         if(pos < 0) {
  156.             break;
  157.         }
  158.         val=PathGetListCount(ifs);
  159.         if(pos < val) {        /* until done */
  160.             PathExpandListEntry(ifs,pos);        /* expand entry */
  161.         } else {
  162.             break;
  163.         }
  164.         pos++;
  165.     }
  166. }
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.